<script setup lang="ts">
import { computed, ref } from "vue";
import { useStore } from "@/store";
const count = ref(0);
const store = useStore();
const showCount = computed(() => {
  return store.getters["getCount"];
});
const addBtn = () => {
  store.commit("setCount", ++count.value);
};
</script>

<template>
  {{ showCount }}
  <el-button type="primary" @click="addBtn" size="default" icon="el-icon-plus"
    >新增</el-button
  >
</template>

<style scoped></style>
